/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package submarines.notices;

import submarines.Player;

/**
 *
 * @author elad + shiran
 * Abstract class of notification
 */
abstract public class Notice {
    
    /*
     * Enum to hold the valid notification types
     */
    public enum NoticeType {
        PLAYER_GOT_HIT,
        PLAYER_GOT_LUCKY,
        PLAYER_SUBMARINE_SUNK,
        PLAYER_QUIT
    };
    
    protected transient Player subject;
    protected transient NoticeType type;
    protected String description;
    
    public  Notice(Player p, NoticeType t) {
        subject = p;
        setClassType(t);
    }
    
    public Player getPlayer()
    {
        return this.subject;
    }
    
    public NoticeType getNoticeType ()
    {
        return this.type;
    }
    
    private void setClassType(NoticeType t) {
        type = t;
    }
    
}
